package com.example.demo.baidu;

import com.baidu.aip.imageclassify.AipImageClassify;
import org.json.JSONObject;

import java.util.HashMap;

public class api {

    //设置APPID/AK/SK
    public static final String APP_ID = "22788572";
    public static final String API_KEY = "gDjq3kdOXQXiA1XMM5qoKMNc";
    public static final String SECRET_KEY = "bOCcLzPRcGXe6guqi4yON19ho1qj67B0";

    public static void main(String[] args) {
        // 初始化一个AipImageClassify
        AipImageClassify client = new AipImageClassify(APP_ID, API_KEY, SECRET_KEY);





        // 调用接口
        String path = "C:/Users/admin/Desktop/肖战.jpg";
        JSONObject res = client.advancedGeneral(path,new HashMap<String ,String>());
        System.out.println(res.toString(2));

    }
}
